﻿/* 
 * yaku
 * http://code.google.com/p/yaku/
 * 
 * Copyright 2011, Bryan McKelvey
 * Licensed under the MIT license
 * http://www.opensource.org/licenses/mit-license.php
 */

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Controls;

namespace yaku
{
    public static partial class Dictionaries
    {
        private static Edict edict;
        private static KanjiDic2 kanjidic;
        private static bool edictLoaded = false;
        private static bool kanjiLoaded = false;

        public static void LoadEdict(ref TextBox searchBar, ref DataGrid resultsGrid, ref TextBlock statusBarText)
        {
            if (!edictLoaded)
            {
                edict = new Edict(ref searchBar, ref resultsGrid, ref statusBarText);
                edictLoaded = true;
            }
        }

        public static void LoadKanji()
        {
            if (!kanjiLoaded)
            {
                kanjidic = new KanjiDic2();
                kanjiLoaded = true;
            }
        }

        #region Properties
        public static Edict Edict
        {
            get { return edict; }
        }
        public static KanjiDic2 KanjiDic
        {
            get { return kanjidic; }
        }
        #endregion
    }
}
